{extend name="admin/public/base"/}
{block name="body"}
<div class="box box-primary">
	<div class="box-header with-border">
		<h3 class="box-title">{$meta_title}</h3>
		<div class="box-tools pull-right">
			<a href="{:url('/admin/user/add')}" class="btn btn-sm btn-primary"> <i class="fa fa-plus-circle fa-lg"></i> 新增用户</a>
		</div>
	</div>
	<div class="box-body">
		<div class="navbar navbar-default">
			<form action="" class="navbar-form form-inline" method="get">
				<div class="form-group">
					<label class="control-label" for="input-order-id">用户名</label>
					<div class="input-group">
						<input type="text" name="name" value="{$param['name']|default=''}" placeholder="用户名" class="form-control">
					</div>
				</div>
				<div class="form-group">
					<label class="control-label" for="input-order-id">邮箱</label>
					<div class="input-group">
						<input type="text" name="email" value="{$param['email']|default=''}" placeholder="邮箱" class="form-control">
					</div>
				</div>
				<div class="form-group">
					<label class="control-label" for="input-order-id">电话</label>
					<div class="input-group">
						<input type="text" name="mobile" value="{$param['mobile']|default=''}" placeholder="电话" class="form-control">
					</div>
				</div>
				<button class="btn btn-primary" type="submit"><i class="fa fa-search"></i> 筛选</button>
			</form>
		</div>
		<div class="table-responsive">
			<table class="table user-list table-hover">
				<thead>
					<tr>
						<th><span>用户</span></th>
						<th><span>Email</span></th>
						<th><span>手机号码</span></th>
						<th><span>授权分组</span></th>
						<th><span>创建时间</span></th>
						<th class="text-center"><span>状态</span></th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					{volist name="list" id="item"}
					<tr>
						<td>
							{if isset($item['avatar_url']) && $item['avatar_url']}
							<img src="{$item['avatar_url']}" alt="{$item['nickname']}"/>
							{else/}
							<img src="{:avatar($item['uid'])}" alt="{$item['nickname']}"/>
							{/if}
							<a href="#" class="user-link">{$item['nickname']}</a>
							<span class="user-subhead">{$item['username']}</span>
						</td>
						<td><span >{$item['email']}</span></td>
						<td><span >{$item['mobile']}</span></td>
						<td></td>
						<td>{$item['reg_time']}</td>
						<td class="text-center">
							{if condition="$item['status']"}
							<span class="label label-primary">启用</span>
							{else/}
							<span class="label label-danger">禁用</span>
							{/if}
						</td>
						<td>
							<a href="{:url('/admin/user/edit', ['uid'=>$item['uid']])}" class="table-link" title="">编辑</a>
							<a href="{:url('/admin/user/auth', ['uid'=>$item['uid']])}" class="table-link">授权</a>
							<a href="{:url('/admin/user/del', ['uid'=>$item['uid']])}" class="table-link confirm ajax-get">删除</a>
						</td>
					</tr>
					{/volist}
				</tbody>
			</table>
			{$page|raw}
		</div>
	</div>
</div>
{/block}